package com.softlab.retailwholesalesystem.entity.VO;

import com.baomidou.mybatisplus.annotation.*;
import com.softlab.retailwholesalesystem.entity.StatisticsEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class StatisticsGoodsVOEntity implements Serializable {
    /**
     * CREATE TABLE t_statistics
     * (
     *     statistics_id BIGINT(20) NOT NULL COMMENT '盘点详情ID',
     *     goods_id BIGINT(20) COMMENT '货物id',
     * #    goods_name VARCHAR(100) COMMENT '货物名',
     *     goods_price DOUBLE(12,2) COMMENT 'A类价格',
     *     goods_stored BIGINT(20) COMMENT '所有仓库库存量',
     *     goods_sold BIGINT(20) COMMENT '所有订单销售量',
     *     goods_profit DOUBLE(12,2) COMMENT '所有订单销售量',
     *     goods_pic VARCHAR(200) COMMENT '货物图片地址',
     *
     *     create_time timestamp,
     *     modified_time timestamp,
     *     is_delete tinyint(1) DEFAULT 0,
     *
     *     PRIMARY KEY (statistics_id)
     * );
     */


    private Long statisticsId;
    private Long goodsId;
    private String goodsName;
    private Double goodsPrice;
    private Long goodsStored;
    private Long goodsSold;
    private Double goodsProfit;
    private String goodsPic;
    private Double soldMoney;
    private Double unSoldMoney;
    private Double purchaseMoney;

    private Date createTime;
    private Date modifiedTime;
    private Integer isDelete;

    public StatisticsGoodsVOEntity(StatisticsEntity entity){
        this.statisticsId = entity.getStatisticsId();
        this.goodsId = entity.getGoodsId();
        this.goodsPrice = entity.getGoodsPrice();
        this.goodsStored = entity.getGoodsStored();
        this.goodsSold = entity.getGoodsSold();
        this.goodsProfit = entity.getGoodsProfit();
        this.goodsPic = entity.getGoodsPic();
        this.createTime = entity.getCreateTime();
        this.modifiedTime = entity.getModifiedTime();
        this.isDelete = entity.getIsDelete();
        this.soldMoney = entity.getSoldMoney();
        this.unSoldMoney = entity.getUnSoldMoney();
        this.purchaseMoney = entity.getPurchaseMoney();
    }
}
